﻿using System.Collections.Specialized;
using StoneAge.Controller.AsyncHandler;
using StoneAge.Controller.User;

namespace StoneAge.Controller.Request
{
    class WebRequest
    {
        private AjaxAsyncResult m_AsyncResult = null;
        public AjaxAsyncResult AsyncResult
        {
            get { return m_AsyncResult; }
            set { m_AsyncResult = value; }
        }

        private UserCookie m_User = null;
        public UserCookie User
        {
            get { return m_User; }
            set { m_User = value; }
        }

        public bool IsAuthenticated
        {
            get { return AsyncResult.Context.Request.IsAuthenticated; }
        }

        public string RequestedURL
        {
            get { return AsyncResult.Context.Request.Url.ToString(); }
        }

        public NameValueCollection QueryArguments
        {
            get { return AsyncResult.Context.Request.Params; }
        }
    }
}
